<include file="Public:header" />
{:W('Navigation')}
<script charset="utf-8" src="__PUBLIC__/js/editor/kindeditor.js"></script>
<script charset="utf-8" src="__PUBLIC__/js/editor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__PUBLIC__/js/jscolor/jscolor.js"></script>
<script>
	KindEditor.ready(function(K) {
			window.editor = K.create('#content', {
			uploadJson:"{:U('core/file/editor')}"
		});
	});
</script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">编辑公告</div>
		<div class="row-table-body">
			<form class="form-horizontal" action="{:U('core/announcement/edit')}" method="post">
				<input type="hidden" name="id" value="{$announcement.announcement_id}"/>
				<p class="form-title">编辑公告 &nbsp;&nbsp;<a href="javascript:history.go(-1);">返回</a></p>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">公告标题</label>
					<div class="col-sm-3">
						<input class="form-control color" type="text" name="title" value="{$announcement.title}">
						<input type="hidden" id="colorpad" name="color" value="{$announcement.color}">
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">发布人</label>
					<div class="col-sm-3">{$announcement.creator_user_name}</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">发布时间</label>
					<div class="col-sm-3">
						<input class="form-control" type="text" name="create_time" value="{$announcement.create_time|date='Y-m-d H:i',###}">
					</div>
					<label for="name" class="col-sm-2 control-label">更新时间</label>
					<div class="col-sm-3">
						<if condition="!empty($announcement['update_time'])">{$announcement.update_time|date='Y-m-d H:i',###}</if>
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">状态</label>
					<div class="col-sm-3">
						<input type="radio" name="status" value="1" <if condition="'1' eq $announcement['status']">checked="checked"</if> />发布 &nbsp;&nbsp;
						<input type="radio" name="status" value="2" <if condition="'2' eq $announcement['status']">checked="checked"</if>/>停用 &nbsp;&nbsp;
					</div>
					<label for="name" class="col-sm-2 control-label">顶置</label>
					<div class="col-sm-3">
						<input type="radio" name="set_top" value="0" <if condition="'0' eq $announcement['set_top']">checked="checked"</if> />否 &nbsp;&nbsp;
						<input type="radio" name="set_top" value="1" <if condition="'1' eq $announcement['set_top']">checked="checked"</if>/>是 &nbsp;&nbsp;
					</div>
				</div>		
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">通知部门</label>
					<div class="col-sm-8">
						<volist name="department_list" id="vo">
							<input type="checkbox" name="department_id[]" <if condition="in_array($vo['department_id'], $announcement['department_idArr'])">checked="checked"</if> value="{$vo.department_id}"/>&nbsp;{$vo.name}&nbsp;&nbsp;
						</volist>
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 control-label">公告内容</label>
					<div class="col-sm-8">
						<textarea id="content" name="content" style="width:800px;height:300px;">{$announcement.content}</textarea>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label"></label>
					<div class="col-sm-3">
						<input name="submit" class="btn btn-primary" type="submit" value="保存"/>&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="button" class="btn" value="取消" onclick="javascript:history.go(-1);"/>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<include file="Public:alert" />
<include file="Public:footer" />